<template>
	<view class="mainpadding beijingse">
		<view class="ffffff radius mainpadding">
			<view class="xiahuax flexbetween" @click="tzfgsj">
				<view class="flexleft">
					<view class="tubiao margin_right2">
						<image src="../../static/image/system/fgsj.png" mode=""></image>
					</view>
					<view class="titletext">复购数据</view>
				</view>
				<view class="righticon1"></view>
			</view>
		</view>
		<view class="ffffff radius mainpadding margin_top" @click="tzxjgm">
			<view class="xiahuax flexbetween">
				<view class="flexleft">
					<view class="tubiao margin_right2">
						<image src="../../static/image/system/xjgm.png" mode=""></image>
					</view>
					<view class="titletext">现金购买</view>
				</view>
				<view class="righticon1"></view>
			</view>
		</view>
		<view class="ffffff radius mainpadding margin_top" v-if="is_area_dl=='false'?true:false" @click="tzhysy">
			<view class="xiahuax flexbetween">
				<view class="flexleft">
					<view class="tubiao margin_right2">
						<image src="../../static/image/system/hygm.png" mode=""></image>
					</view>
					<view class="titletext">会员收益</view>
				</view>
				<view class="righticon1"></view>
			</view>
		</view>
		<view class="ffffff radius mainpadding margin_top" @click="tzxssj">
			<view class="xiahuax flexbetween">
				<view class="flexleft">
					<view class="tubiao margin_right2">
						<image src="../../static/image/system/xssj.png" mode=""></image>
					</view>
					<view class="titletext">销售数据</view>
				</view>
				<view class="righticon1"></view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				is_login: false,
				user_sf_id:'',
				is_area_dl:''
			}
		},
		onLoad(option){
			console.log(option);
			let {is_area_dl,user_sf_id}=option
			this.user_sf_id=user_sf_id
			this.is_area_dl=is_area_dl
			
			uni.setNavigationBarTitle({
				title:this.user_sf_id==3?'服务中心':this.user_sf_id==4?'运营中心':'城市代理'
			})
		},
		methods: {
			// 跳转复购数据
			tzfgsj(){
				if (!httpRequest.checkIsLogin()) {
					httpRequest.doLogin();
					return false;
				}
				uni.navigateTo({
					url: '/pages/mypage/fugousj?user_sf_id='+this.user_sf_id
				})
			},
			// 跳转现金购买
			tzxjgm(){
				if (!httpRequest.checkIsLogin()) {
					httpRequest.doLogin();
					return false;
				}
				uni.navigateTo({
					url: '/pages/mypage/xianjingm?user_sf_id='+this.user_sf_id
				})
			},
			// 跳转会员收益
			tzhysy(){
				if (!httpRequest.checkIsLogin()) {
					httpRequest.doLogin();
					return false;
				}
				uni.navigateTo({
					url: '/pages/mypage/huiyuansy?user_sf_id='+this.user_sf_id
				})
			},
			// 跳转销售数据
			tzxssj(){
				if (!httpRequest.checkIsLogin()) {
					httpRequest.doLogin();
					return false;
				}
				uni.navigateTo({
					url: '/pages/mypage/xiaoshousj?user_sf_id='+this.user_sf_id
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.tubiao {
		width: 40rpx;
		height: 40rpx;
	
		image {
			width: 100%;
			height: 100%;
		}
	}
	.righticon1 {
		width: 14rpx;
		background-size: 100% 100%;
		height: 30rpx;
		background-image: url('../../static/image/system/righticon.png');
	}
	.titletext{
		font-size: 32rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
		line-height: 38rpx;
	}
</style>